<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@taglib uri="/struts-tags"  prefix="s" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>用户登录</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<script type='text/javascript' src='/DwzSystem/dwr/engine.js'></script>
    <script type='text/javascript' src='/DwzSystem/dwr/interface/customerAction.js'></script>
    <script type='text/javascript' src='/DwzSystem/dwr/util.js'></script>

     <script type="text/javascript">  
     function CheckCustomer(){
	       var name = $("cus_name").value;
	       var password = $("cus_password").value;
	       if(name==""){
		       alert("用户名不能为空");
		       $("cus_name").focus();
		       return false;
	       }else {
	    	   customerAction.checkCustomerWithName(name,callbackMsg);
	       }
		}
		function callbackMsg(msg){
			  
			        $("result").innerHTML=msg;
		}  

		//更新验证码
		function change_yzm(image) {
			document.getElementById(image).src = "randomImage.action" + "?random="+ Math.random();
		}
    </script>
    <style type="text/css">
		<!--
		body {
			margin-left: 0px;
			margin-top: 0px;
			margin-right: 0px;
			margin-bottom: 0px;
			overflow:hidden;
		}
		.STYLE3 {font-size: 12px; color: #adc9d9; }
		.STYLE4 {font-size: 12px; color: #FFFF00 ; }
		-->
	</style>
   <!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
  <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
  <form id="form" name="form" method="post" action="customer.action" >
 <table width="100%"  height="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td bgcolor="#1075b1">&nbsp;</td>
  </tr>
  <tr>
   <td  background="images/login/login_03.gif">
<!-- ImageReady Slices (login.psd) -->
<table id="__01"  width="847" border="0" align="center" height="613" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td colspan="8">
			<img src="images/login/login_01.gif" width="1003" height="2" alt=""></td>
	
	</tr>
	<tr>
		<td rowspan="7"><img src="images/login/login_02.gif" width="68" height="611" alt=""></td>
		<td rowspan="6">
			<img src="images/login/login_03.gif" width="23" height="608" alt=""></td>
		<td colspan="5">
			<img src="images/login/login_04.gif" width="847" height="289" alt=""></td>
		<td rowspan="7">
			<img src="images/login/login_05.gif" width="65" height="611" alt=""></td>
		
	</tr>
	<tr>
		<td>
			<img src="images/login/login_06.gif" width="281" height="29" alt=""></td>
		<td rowspan="4" width="262" height="153" background="images/login/login_07.gif"  alt="">	
		<table align="right" width="100%"  border="0" cellspacing="0" cellpadding="0">
		     <tr><td height="10">&nbsp;</td><td height="10">&nbsp;</td><td><span class="STYLE4">${errorInfo}</span></td></tr>
              <tr>
                <td width="50" height="24" valign="bottom"><div align="right"><span class="STYLE3">&nbsp;用&nbsp;&nbsp;&nbsp;&nbsp;户:</span></div></td>
                
                <td height="24" colspan="2" valign="bottom">
                  <div align="left">
                    <input id="cus_name" name="customer.cus_name" type="text" onBlur="CheckCustomer()" 
                    style="width:100px; height:17px; background-color:#87adbf; border:solid 1px #153966; font-size:12px; color:#283439; ">
                    <span id="result"></span></div></td>
                   
              </tr>
              <tr>
                <td  width="50" height="26" valign="bottom"><div align="right"><span class="STYLE3">&nbsp;&nbsp;密&nbsp;&nbsp;&nbsp;&nbsp;码:</span></div></td>
            
                <td height="26" colspan="2" valign="bottom"><input id="cus_password" name="customer.cus_password" type="password"
				style="width:100px; height:17px; background-color:#87adbf; border:solid 1px #153966; font-size:12px; color:#283439; "></td>
               <td width="10" valign="bottom"><div align="left"><span id="XX"></span></td>
              </tr>
            <tr>
                <td   height="24" valign="bottom"><div align="right"><span class="STYLE3">验证码:</span></div></td>
          
                <td width="53" height="24" valign="bottom"><input type="text" name="randomCode" id="randomCode" value="" style="width:50px; height:17px; background-color:#87adbf; border:solid 1px #153966; font-size:12px; color:#283439; "></td>
                <td  valign="bottom"><div align="left"><img id='yzm_img' onClick="change_yzm('yzm_img');" src="randomImage.action"/></div></td>
              </tr>
               <tr>
                <td   height="24" valign="bottom"><div align="right"></div></td>
                <td   height="24" valign="bottom"><div align="right"></div></td>
                <td  height="24" valign="bottom">
                <input  type="radio" name="customer.cus_type" value="1"/><span class="STYLE3">管理员</span>
				<input type="radio" name="customer.cus_type" value="2" checked/><span class="STYLE3">客户</span>
                </td>
             
              </tr>
               <tr>
                <td   height="24" valign="bottom"><div align="right"></div></td>
                <td   height="24" valign="bottom"><div align="right"></div></td>
                <td  height="24" valign="bottom"><a href="register.jsp"><span class="STYLE3">没有账号？马上注册</td></a>
             
              </tr>
              
              
            </table>
            </td>
		<td colspan="3">
			<img src="images/login/login_08.gif" width="304" height="29" alt=""></td>
		
	</tr>
	<tr>
		<td>
			<img src="images/login/login_09.gif" width="281" height="84" alt=""></td>
		<td>
			<img src="images/login/login_10.gif" width="26" height="84" alt=""></td>
		<td width="67" height="84" background="images/login/login_11.gif" alt="">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="25"><br/><div align="center">
                <input type="image" name="submit" src="images/login/dl.gif"  width="57" height="20" onClick="document.form.submit()"></div></td>
            
              </tr>
			  <tr>
                <td height="5"></td>
              </tr>
              <tr>
                <td height="25"><div align="center">
                <input type="image" name="reset" src="images/login/cz.gif" width="57" height="20" onClick="document.form.reset();return false"></div></td>
            
              </tr>
            </table></td>
		<td rowspan="2">
			<img src="images/login/login_12.gif" width="211" height="85" alt=""></td>
		
	</tr>
	<tr>
		<td rowspan="2">
			<img src="images/login/login_13.gif" width="281" height="40" alt=""></td>
		<td colspan="2" rowspan="2">
			<img src="images/login/login_14.gif" width="93" height="40" alt=""></td>
		
	</tr>
	<tr>
		<td>
			<img src="images/login/login_15.gif" width="211" height="39" alt=""></td>
		
	</tr>
	<tr>
		<td colspan="5">
			<img src="images/login/login_16.gif" width="847" height="166" alt=""></td>
		
	</tr>
	<tr>
		<td colspan="6">
			<img src="images/login/login_17.gif" width="870" height="3" alt=""></td>
	
	</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- End ImageReady Slices -->
</form>
</body>
  
</html>
